package com.starleague.battletech.unit;

import java.util.Map;

import com.starleague.battletech.AbstractBattletechPoints;
import com.starleague.common.AbstractHasInfoProperties;

public abstract class AbstractBattletechUnitHitLocation
        extends AbstractHasInfoProperties
        implements IBattletechUnitHitLocation
{
    private AbstractBattletechPoints armorHitPoints;
    private AbstractBattletechPoints internalStructureHitPoints;

    protected AbstractBattletechUnitHitLocation(AbstractBattletechPoints armorHitPoints,
                                                AbstractBattletechPoints internalStructureHitPoints)
    {
        this.armorHitPoints = armorHitPoints;
        this.internalStructureHitPoints = internalStructureHitPoints;
    }

    protected AbstractBattletechUnitHitLocation()
    {
        //
    }

    @Override
    public AbstractBattletechPoints getArmorHitPoints()
    {
        return this.armorHitPoints;
    }

    protected void setArmorHitPoints(AbstractBattletechPoints armorHitPoints)
    {
        this.armorHitPoints = armorHitPoints;
    }

    @Override
    public AbstractBattletechPoints getInternalStructureHitPoints()
    {
        return this.internalStructureHitPoints;
    }

    protected void setInternalStructureHitPoints(AbstractBattletechPoints internalStructureHitPoints)
    {
        this.internalStructureHitPoints = internalStructureHitPoints;
    }

    @Override
    public Map<String, Object> infoProperties()
    {
        Map<String, Object> infoPropertyMap = super.infoProperties();
        infoPropertyMap.put("armorHitPoints", this.armorHitPoints);
        infoPropertyMap.put("internalStructureHitPoints", this.internalStructureHitPoints);
        return infoPropertyMap;
    }
}
